#ifndef MENUTOBOOKS_H
#define MENUTOBOOKS_H

#include <QDialog>
#include <vector>
#include "bookstore.h"
#include "studentstore.h"
#include "utils.h"
using namespace utils;
using namespace bookstore;
using namespace bookandrecord;
using namespace studentstore;

namespace Ui {
class MenuToBooks;
}

class MenuToBooks : public QDialog
{
    Q_OBJECT

public:
    explicit MenuToBooks(QWidget *parent = nullptr);
    ~MenuToBooks();

private slots:
    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void on_pushButton_3_clicked();

    void getData(Menu*,Student*);

    void showPageButton();

    void clear();
    void show1();
    void show2();
    void show3();
    void show(vector<Book*>bookList,int numofpage);
    char* bookcondition(int);
    char* bookisborrowed(int);

    void on_pushButton_4_clicked();

    void on_pushButton_5_clicked();

    void on_pushButton_6_clicked();

    void on_pushButton_7_clicked();

    void on_pushButton_8_clicked();

    void on_pushButton_9_clicked();

private:
    Ui::MenuToBooks *ui;
    vector<Book*> bookList;
    Menu *menu;
    Student* stu;
    int page;
    int pagesize;
    int page_size;
};

#endif // MENUTOBOOKS_H
